from django import  template

register = template.Library()



@register.filter
def to_sex(values,arg='zh'):
    chang = {
        'zh':("男",'女'),
        'en':("Male","Female")
    }
    print(chang[arg][values])
    return  chang[arg][values]

# register.filter('to_sex',to_sex)